@include "ttest.awk"

BEGIN { unpairedTtests() }

function unpairedTtests(    a,b,c,i) {
    split("54,62,75,59,78,64,69,72,50,73",a,",")
    split("47,51,54,62,44,51,48,65,42,44,71,68",b,",")
    #------------------------------------------------------------
                                test("ttest",     ! theSame(a,b))
    seed(1); mutate(a,c, 0)   ; test("ttest0",      theSame(a,c))
    seed(1); mutate(a,c, 0.1) ; test("ttest0.1",    theSame(a,c))
    seed(1); mutate(a,c, 0.2) ; test("ttest0.2",  ! theSame(a,c))
    seed(1); mutate(a,c,-0.1) ; test("ttest-0.1",   theSame(a,c))
    seed(1); mutate(a,c,-0.2) ; test("ttest-0.2", ! theSame(a,c))
}
function mutate(a,b,n,  i) {
    for(i in a) 
        b[i] = a[i]*rand()^n
}
